Contents
Windows Grep Help

Welcome to Windows Grep 1.5, the powerful text search utility for Microsoft Windows.

Select the topic you want help on:

Whats New?
Introduction
Windows Grep Basics	Advanced Topics
Toolbars	Regular expressions
Menu	Drag-drop
Status bar	File Manager extension
Searching	Command line interface
Configuration	Notes on searching binary files
Shareware information	Customising Windows Grep
	Maximising search speed
	Whats new in version 1.5
	Using Windows Grep with SpexEdit
Support and updates	Using Windows Grep with PFE


Introduction

Windows Grep is a versatile utility for searching disk files for text strings. In addition to searching pure ASCII files such as program source code files like traditional Grep utilities, Windows Grep can also search any type of binary file, such as word-processor, spreadsheet and database files.

Windows Grep is a MDI application which features toolbars to speed operation and a status bar. It can be driven using the menu system or the toolbars. It is best used with a mouse. There are two types of windows opened in the MDI frame. Results from searches are output in result windows. Files loaded for viewing are shown in view windows.

To perform a search, the string to find and the file(s) to search must be entered into the search criteria dialog box, accessed by selecting File|Search... from the menu, or clicking on the search (magnifying glass) button on the toolbar.

Pressing the OK button in the search criteria dialog box opens a result window and starts the search. If matches are found in text files, lines that contain the specified string will be displayed in the new window. If matches are found in binary files, the match will be shown +/- a user specified number of characters.

During the search, progress statistics are shown in a search progress dialog box. The search can be stopped at any time by clicking its Cancel button, or pressing Enter. Final statistics will be shown when the search is complete.

Double-clicking on text in a result window causes one of four actions to occur:

- 	The file from which the line clicked on came is loaded into a view window.

- 	The application that originally created the file is run.

- 	An external viewer/editor command is executed.

- 	A dialog is displayed to allow one of the above three choices to be picked.

The action taken is set in the configuration dialog box, accessible by selecting File|Configure... from the menu, or clicking on the configure (spanner) button on the toolbar. It is possible to have different actions set for text and binary files.

Text in either a result window or view window can be output to the printer by selecting File|Print... from the menu or clicking on the print (printer) button on the toolbar.

The text can be saved to disk by selecting File|Save As... from the menu or clicking on the save (disk) button on the toolbar.

Files may be loaded directly into a view window by selecting File|Open... from the menu or clicking on the open (folder) button on the toolbar. Matches found in the file will be shown as it is loaded. Once loaded, the search criteria can be modified by selecting File|Criteria... from the menu or clicking on the change criteria button (magnifying glass with question mark).

Windows Grep can be iconised whilst it is searching. The icon caption changes from Windows Grep - Searching to Windows Grep - Finished when the search is complete, and a message box is displayed.

Windows Grep also supports drag-drop from the File Manager, has a File Manager extension DLL and a command line interface. See the relevant sections in this help file for more information.


Status Bar

1	2	3

The status bar gives instructions and shows statistics about searches. It is divided into either 2 or 3 sections, depending on the child toolbar positions.

Section 1 gives an explanation of the function of each menu item as it is selected, and the status of the program during printing and searching.

Section 2 shows the current search string, or a portion of it if it will not all fit.

Section 3 shows statistics about the active window. If the active window is a result window, the total number of matches, the number of files searched and the number of files containing matches is listed. If it is a view window, the string currently highlighted and number of matches in the file being viewed is listed.

If child toolbars have been selected and are horizontal, section 3 is not shown. Instead, the information it would contain is shown on the child toolbars.


Searching

Searching can be started by one of five methods:

- 	Pressing the search button on the toolbar

- 	Selecting File|Search... from the menu

- 	Dragging files from the File Manager to the main window

- 	Using the File Manager extension

- 	Supplying parameters on the Windows Grep command line

In the first four methods a search criteria dialog box is presented which allows search criteria to be specified and options that affect the search to be set.  Clicking the OK in the dialog initiates the search.

In the last method, the search criteria is specified on the command line and the search is initiated as soon as the program starts up.

Additionally, a single file can be loaded into a view window by pressing the open button on the toolbar, or selecting File|Open from the menu. This will result in that file being searched as it is loaded, showing all occurrences of the current search string (shown on the status bar).

During searches, progress statistics are shown in a search progress dialog box. The search can be stopped at any time by clicking its Cancel button, or pressing Enter. Final statistics will be shown when the search is complete.

See also
Search criteria dialog box	Regular expressions
Search progress dialog box	Drag-drop
Command line interface	File Manager extension


Configuring Windows Grep
Configuring

Many aspects of the operation of Windows Grep can be changed using the configuration dialog, including:

- 	Color and font of text used in the result and view windows

- 	Tab width

- 	Size of binary 'window' shown either side of matches in binary files

-  	Action to take when double-clicking on matches from text and binary files

-	Positions and style of the main and child toolbars

-	Actions taken when Windows Grep is first started

Configuration changes are saved between sessions.

In addition to the items configurable via the configuration dialog, a number of more esoteric facets of the programs' operation can be modified by directly editing the WGREP.INI file. See the Customising Windows Grep topic for more information.

See also

   Configuration dialog box

   Customising Windows Grep


Shareware Information

Windows Grep is distributed as Shareware. It is not free or public domain. This means you may copy and distribute it freely but should you find it useful and use it beyond an initial evaluation period of 30 days you are both legally and morally obliged to pay the license fee. See the read me file included in the distribution archive/on the distribution disk for more information.

The single user license fee is £10.00 or US$20.

Please enquire for site license rates on quantities above 5.

There are two ways to register this program:

1. 	If you have access to CompuServe, you can register on-line using SWREG. Simply type GO SWREG and follow the instructions. Enter Windows Grep's ID # 306 when prompted. The $20 will be charged to your CompuServe account, and I will inform you of your registration number by e-mail, usually within 24 hours.

2. 	By Mail. Cash or checks/cheques can be accepted in any major currency, equivalent in value to US$20 per copy. Sterling Eurocheques are preferred from European countries that supply them.

   Click here for Shareware registration form

Registered users will be sent a registration number to disable the reminder box. This number will be good for all subsequent Shareware versions of the program that may become available. I will also endeavour to inform you when such upgrades are released. See Support and updates for information on how to obtain the latest version of the program.

I would be pleased to receive any comments, bug reports or suggestions for future releases. I may be contacted by e-mail at the addresses below:

Internet/CIX: 	huwmill@cix.compulink.co.uk

CompuServe: 	100016,3452

See also

   Acknowledgements

   Shareware registration form

   Entering registration information


Registration dialog box
Registering

To personalise your copy of Windows Grep once you have registered it and received your code:

- 	Select File|Register... from the menu to display the registration dialog box.

- 	Enter your name and number EXACTLY as you receive them. The name is case sensitive.

- 	Press OK.

The Shareware reminder box will no longer be displayed and you may continue to use Windows Grep after the 30 day trial period.


Command Line Interface

Windows Grep supports command line parameters to allow it to be used from one of the many Windows command line interface programs.

The syntax is as follows:

WGREP [<options>] <string> <filespec>

<options> are optional and must appear on the command line before the other parameters.

The options provided are:

/i	Ignore case	/i-	Don't ignore case

/n	Number lines	/n-	Don't number lines

/v	Invert match	/v-	Don't invert match

/r	Recurse sub directories	/r-	Don't recurse sub directories

/ac	Count matches only

/af	Show first match only

/an	Show names of files with matches only

/aa	Display all matches

/d<dir>	Start search in <dir> (No space between d and <dir>)

If no options are specified the values saved from previous searches are used.

The <string> and <filespec> parameters are mandatory.

If the parameters are all correct then the search will be initiated as soon as the program is started. If any are missing or incorrect, the program starts up normally.

For more information about the parameters and their meanings see Search criteria dialog box

See also

   Command line examples


Drag-Drop

Windows Grep supports drag-drop as both a client and a server.

To initiate a search from the File Manager, using drag-drop:

- 	Select the file(s) you want to search in File Manager

- 	Drag them to the Windows Grep window or icon, and release the mouse button

- 	A modified search criteria dialog box is now displayed. Enter the string to search for and any options in this dialog and press OK

- 	The files selected will be searched as normal

To drop a file found to contain matches onto a running application:

-	Click on a line from the file to be dropped in a result window

-	Drag the mouse (the icon changes to a piece of paper), and drop onto any drag-drop client, such as Program Manager, Write, Notepad, Borland Pascal, etc.

To quickly search a file already searched, with different criteria:

-	Click on a line from the file to be searched in a result window

-	Drop onto the title bar of Windows Grep

To load a file into an open view window:

-	Click on a line from the file to be viewed in a result window

- 	Drop onto the view window. The file will be loaded and all matches of the string set up for that window will be highlighted

This version of Windows Grep acts as a drag-drop server for single files only.

See also

   Drag-drop search criteria dialog box


File Manager Extension

Windows Grep comes equipped with a File Manager Extension Dynamic Link Library (DLL) that provides an additional menu item on the File Manager's main menu.

To install the extension, select Install File Manager Extension in the Configuration dialog box. This will add a line to WINFILE.INI to instruct the File Manager to load the extension the next time it is run.

When installed, an additional item Grep will be available on the File Manager's main menu which will have a sub-menu with two items:

Grep|Search

Search the currently highlighted files. This will be greyed out until one or more files are selected.

Grep|About...

Display information about the extension DLL.

To use the extension:

- 	Select one or more files in the File Manager window as usual

-	Select Grep|Search from File Manager's menu

-	A modified search criteria dialog box will be displayed. Enter the search criteria, and press OK

-	The selected files will be searched and matches shown in the usual way.

If you are using Windows For Workgroups v3.1 or higher, a button is provided for attachment to the File Manager's toolbar. This will not appear automatically, but can be enabled by selecting Customise Toolbar... from the Options menu and scrolling down the list of available buttons until the 'magnifying glass'  is found. See the Windows manual or File Manager's help file for more information on changing the toolbar. Also, messages will be displayed on its status bar when items from the Grep menu are selected.

See also

   File Manager search criteria dialog box


Maximising Search Speed

Performance has been enhanced in this release of Windows Grep, it being typically 50% faster when searching text files compared to previous versions. There are several ways you can increase performance even further:

Set tab width to 1

Setting tabs to 1 from the configuration dialog box effectively disables the tab expansion algorithm and speeds up searches by a further 10%.

Set exclusive on

Checking the exclusive box while a search is in progress minimises the number of times Windows Grep yields control to other programs. A further 5% increase can be gained here.

Ensure Autoscroll is off

The new autoscroll feature will slow searching considerably if a lot of matches are found, so if you are expecting a lot of matches ensure it is turned off before commencing the search.


Customising Windows Grep

Read this topic for details on customising Windows Grep's behaviour beyond that provided in the configuration dialog box. This requires you to edit WGREP.INI, which can be found in your windows directory (probably c:\windows) using notepad or similar. It is advisable to make a backup copy of the file before modifying it, particularly if you are a registered user (you could lose your registration details otherwise). Note that many of the lines described below may already be in WGREP.INI, so rather than adding them, edit the existing one.

Toolbar button style

Normally, unavailable buttons are shown with their bitmaps greyed-out. If you prefer the Microsoft Access look, where unavailable buttons are hidden, add the following line to the [Configuration] section of WGREP.INI:

HideToolbarButtons=1

Regular Expression help

If you would prefer the regular expression help panel on the Search Criteria dialog boxes to be open by default instead of closed, add the following line to the [Configuration] section of WGREP.INI:

ShowRegExpHelp=1

Toolbox height and width

By default, the toolbox will be 3 buttons wide by 5 deep. If you would prefer a long thin or short fat toolbox, add the following lines to the [Windows Grep] section of WGREP.INI:

ToolboxW=w

ToolboxH=h

Where w and h are numbers in the range 1-15. There are 15 buttons in total, so sensible value would be w=1 h=15, w=15 h=1, w=5 h=3, w=2 h=8 etc.

Changing the sound that is played when a search has been completed

When Windows Grep has finished searching, it makes a sound. By default this is whatever sound you have set up for the SystemAsterisk event in the Control Panel. If you don't want a sound, or want to change it to another .WAV file (c:\sounds\finish.wav in the example below) add the following line to the [Configuration] section of WGREP.INI:

No sound:	FinishSound=

Different sound:	FinishSound=c:\sounds\finish.wav

File Extension: Modifying its behaviour

Normally, the Windows Grep File Manager Extension DLL will only allow Windows Grep to be started when file(s) are selected in the File Manager window. If you would like to be able to start it regardless of whether files are selected or not, add the following line to the [Configuration] section of WGREP.INI

FExtMode=1

Bringing SpexEdit or PFE to the top on subsequent double-clicks

To bring the SpexEdit or PFE window to the top after a line in Windows Grep has been clicked on, add the line below to the [Configuration] section:

BringViewerToTop=1

Upgrading from previous versions of Windows Grep

If you have used versions of Windows Grep prior to v1.4, you may notice that the structure of WGREP.INI has been tidied up. Thus, all your previous settings will be lost. If you have not registered Windows Grep, it may be an idea to delete the old copy and let v1.4 create a fresh one. If you have registered, you may want delete all lines in the [Windows Grep] section EXCEPT the name= and number= ones to prevent confusion when you examine the file.


What's new in v1.5
What's New In Version 1.5

This topic gives details of changes made since version 1.4. (1.4a, 1.41, 1.41a and 1.5)

Version 1.5

General

Setup program

A setup program is now used to ease the installation process.

Support for UNIX style text files

As you will have noticed, there is a new DLL shipped with this release, CFILEIO.DLL. Borland Pascal's text file i/o functions did not handle UNIX style text files, so this DLL exports C's fopen, fgets etc. functions to allow them to be called from BPW. This solves the problem, and surprisingly, speeds up searching slightly.

Screen corruption when sizing window

v1.4x suffered from a problem with corruption if a child window was maximised and the main window was resized. Parts of the scroll bars were left behind. This has been fixed.

Microscrolls

All edit boxes that accept integer values have been fitted with microscroll controls.

Increasing search speed

I received many complaints about the speed (or rather, the lack of it) of searching. I have addressed this, and it is now possible to search text files at approximately twice the speed. To maximise search speed, turn autoscroll off (see Search options below), set tab size to 1 and check the Exclusive checkbox while searching. (see Searching below). The main delay was found to be the detabbing function. Setting tab width to 1 now disables detabbing. For the ultimate speed improvement, upgrade to Windows For Workgroups 3.11, deinstall DoubleSpace (if you use it) and ensure 32 bit disk/file access is enabled. This made a hell of a difference on my system!

Better memory and resource use

Memory used during searches has been reduced and a memory leak fixed. GDI resource usage has also been rationalised.

Search options

In the search options dialog, the following features have been added:

Match Whole Words Only

This does what its name suggests and will match whole words only.

Regular expression enhancements

Logical expressions and operators have been implemented to allow AND / OR type searches. The new operators can be seen in a list by clicking the Regular expression list button, and double clicking in this list inserts the appropriate character in the search string. Examples:

Win|Grep

Find lines containing Win OR Grep. Only the first of each expression will be highlighted.

Win&Grep

Find lines containing Win AND Grep. Only the first of each expression will be highlighted.

(Win)(Grep)

Find lines containing Win or Grep, and show all occurrences.

Win#Grep

Find lines containing Win OR Grep, but not both.

(Win|Grep)&If

I'm sure you get the hang if it by now...

The logical operators have limited use in binary file searches. They work only in contiguous blocks of text within the file.

So, Win&Grep would match  	......Windows Grep.......more text........more text......

But not	......Windows........more text.....Grep.......more text......

Where ... represents blocks of non-printing binary bytes.

Case sensitivity and whole word matching can be toggled within the search string by using <,> and {,} respectively.

A new combo-box allows choice of 'no regular expressions', 'standard regular expressions' and 'extended regular expressions' to enable/disable regular expressions easily.

The new regular expression help pane can be made to be visible by default by putting a line in the [Configuration] section of WGREP.INI: ShowRegExpHelp=1.

Date and Time filtering

Files can be filtered out before they are searched by date stamp and/or file size. Clicking the Filters... button brings up a dialog box to allow the filter ranges to be set. To activate a filter check the Enable date filter and/or Enable size filter on the main dialog.

Multiple directories

This was much requested: You can now enter multiple directories separated by a semi-colon to have the search do more that one 'branch' at once. For example c:\msvc\source;c:\bp\source will search c:\msvc\source (and its sub directories if recurse subdir is selected) then c:\bp\source (and its sub directories if recurse subdir is selected). Adding a semi-colon to the end of the directory edit-box before pressing Pick... will cause the picked directory to be appended to the end of the directory already entered, otherwise it will be overwritten.

Autoscroll

Checking Autoscroll will cause the results window to automatically scroll as matches are found. This slows the search down considerably, so should be used sparingly. Also, result-window sizing has been disabled while autoscroll is in progress to prevent text corruption.

Close Dialog

Checking Close Dialog will cause the search dialog to be automatically closed when the search is complete.

Searching

Priority

A new check-box has been added to the search progress dialog, Exclusive, to control how often Windows Grep yields control to other processes. If the box remains unchecked, it yields after every line of text (or binary buffer). This makes it a very good multi-tasker, but slows searching down slightly. Checking the box causes it to yield once per file, thus speeding the search. This still allows the cancel button to be pressed, for example, but there may be some delay before it is acted on.

Program exiting inhibited

v1.4x allowed the program to be exited while a search was in progress. This caused a GPF and has now been inhibited.

Skip file/Skip directory

Skip file will stop searching the current file and jump to the next file. Skip directory will stop searching the current file and all others in the same directory and skip to the next directory.  Skip file will be disabled if Exclusive is checked since no control is yielded until the current file has been searched.

Progress bar

A progress bar will spring into life if you elect to Count file first in the search criteria dialog. Obviously, if files are not counted, it has no way of knowing how the search is progressing. If size/date filters are activated, the progress bar may never reach 100% because while counting the files, the filter conditions are not checked to save time.

Support for PFE

PFE (Programmers file editor) can be controlled over a DDE link to make it behave like the internal view windows when lines in result windows are double-clicked on.

Command Line Interface

The start directory can be specified on command line by using /d<dir> (no space between d and <dir>)

Configuration

Selectable .WAV

Some people don't like Windows Grep making noises when the search is complete.  So, by adding FinishSound=<.wav filename> to the [Configuration] section of WGREP.INI, it can be changed or disabled (by leaving it blank).

Tools/Toolbox

Tools can be horizontal or vertical as before, but can now be in a floating toolbox. By default it will be 5x3. To change its width/height, add ToolboxW=n and ToolboxH=n to the [Windows Grep] section of WGREP.INI. Try 8x2 or 2x8 for wide/tall toolboxes.

Separate screen and printer fonts

Support for different screen/printer fonts allows highly readable screen fonts such as BorlandTE (supplied with Borland compliers) to be used on screen and clear printer fonts such as Courier New to be used for printed output. Try printing in BorlandTE to see why I implemented this!

Result viewing

Next/Previous file

The < and > buttons are now available on result windows. These will step backwards/forwards through the search results one file at a time, thus making the file name line the top line of the result window.

File Manager Extension

Windows For Workgroups support

If you have Windows for Workgroups 3.1/3.11, the Windows Grep file manager extension will provide a button for the toolbar, and send help strings to the status bar.

Mode of operation

By default, the search option is only enabled if file(s) are selected in the File Manager window. If you want it to be available all the time, add FExtMode=1 to the [Configuration] section of WGREP.INI

Version 1.41a maintenance release

'Execute command below' buffer enlarged to prevent intermittent GPFs when lines are double-clicked on.

Bug in File Manager extension fixed that prevented the 'Grep' item appearing on the menu if it was the only extension being loaded.

Version 1.41 interim release

'Ask after double-click, execute command below' did not work. This has been fixed.

Message on status bar when toolbar buttons are pressed.

SpexEdit aware.

Conversion to CTL3D.DLL v2.0

Exit prevented while search is in progress. A GPF occured before.

Version 1.4a maintenance release

Files 0 bytes long caused a runtime error 215. This has been fixed.

Directory combo-box in search criteria dialog box now accepts direct entry of directories.


Using Windows Grep With SpexEdit

SpexEdit is a Windows text editor that has been designed to interact with other programs. Windows Grep is SpexEdit-aware, thus allowing SpexEdit to be 'driven' in much the same way as the internal text file viewer.

To use SpexEdit with Windows Grep, simply put the full path name of the SpexEdit executable in the Text viewer command edit box in the configuration dialog box. For example, if SpexEdit has been installed in the directory c:\spexedit, enter:

C:\SPEXEDIT\SPEXEDIT.EXE

and select Execute command below as the Text file double-click action.

Then, when lines are double-clicked on in result windows, SpexEdit will be launched with the file loaded and the line clicked on will be highlighted. Subsequent double-clicks on lines from the same file will move the highlight in SpexEdit. Double-clicks on lines from other files will instruct SpexEdit to load the new file.

SpexEdit Lite, the Shareware version of SpexEdit should be available from the same source that you obtained Windows Grep from, and can be registered for $20. SpexEdit is the companion product to Spex, a C++ browser that supports AT&T v2.2 and all Microsoft extensions. Unlike other browsers, Spex is not dependent upon a host compiler, can browse code that doesn't compile, can browse any library code, and can browse classes, globals, and macros.

For further information about Spex, SpexEdit and SpexEdit Lite, contact Kevin Donn on CompuServe 71532,403 or at Little Wing, 4618 John F. Kennedy Blvd., Ste. 176, N. Little Rock, AR 72116, USA. Phone:  (501) 771-2408.


Using Windows Grep With PFE

PFE is an excellent text file editor written by Alan Phillips at Lancaster University Computer Centre, UK. Among its many features is the ability to be controlled over a DDE link. This allows Windows Grep to control it in much the same way as the internal view windows are controlled when lines in result windows are double-clicked on.

To use PFE with Windows Grep, simply put the full path name of the PFE executable in the Text viewer command edit box in the configuration dialog box. For example, if PFE has been installed in the directory c:\pfe, enter:

C:\PFE\PFE.EXE

and select Execute command below as the Text file double-click action.

Then, when lines are double-clicked on in result windows, PFE will be launched, the file will be loaded with the line clicked on highlighted. Subsequent double-clicks on lines from the same file will move the highlight, while double-clicks on lines from other files will instruct PFE to load the new file.

Version 05.006 of PFE was used for testing during program development. If you have a different (earlier) version, DDE may not work as described because many DDE commands were changed in this release.

For more information about PFE, contact Alan Phillips at A.Phillips@lancaster.ac.uk.


Thanks!

Thanks again for registering Windows Grep. You can be assured that your support for this program will encourage me to continue its development and enhancement.

Don't forget you can now disable the splash-screen from the configuration dialog if you want to.

If you have any comments or suggestions for future releases, please let me know, preferably by e-mail. Windows Grep thrives on user-feedback, so please send plenty of it!

Huw Millington

West Sussex, England

January 1994.

huwmill@cix.compulink.co.uk

100016,3452 on CompuServe


Support and Program Updates
Getting Support and Program Updates

I am always pleased to receive feedback from Windows Grep users, registered or not. I endeavour to reply to all correspondence within 24 hours, usually quicker if you contact me by e-mail. My mailboxes are huwmill@cix.compulink.co.uk or 100016.3452@compuserve.com (internet) or 100016,3452 on CompuServe.

You can obtain the latest version from the following sources:

CIX

If you have access to CIX, the UKs premier conferencing system, support is available in the WinGrep conference. The latest version of the program will always be made available there first, as well as beta releases of forthcoming versions.

CompuServe

The current version will be available in WINSHARE library 2. In addition, I may upload major releases to BPASCAL, UKSHARE and other forums.

Internet

If I ever get the hang of anonymous ftping, I will try and make updates available on ftp.cica.indiana.edu.

Snail-mail

If you are in the UK and dont have access to a modem, simply mail me a disk and an SAE and I will return it with the latest version on by return of post.


Grep

Grep is an UNIX acronym for Global Regular Expression Parser


Result Window

Result windows show results from searches. Matches found are shown in a different colour text. Search statistics are shown either on the window toolbar or on the status bar.


View Window

View windows display the contents of text or binary files after a line in a result window has been double-clicked on, or a file has been loaded using the File|Open... command. All matches in the file are shown in a different colour text. The number of matches in the file is shown either on the window toolbar or on the status bar.


Acknowledgements

I would like to thank the following people, whose help has been invaluable during the development of Windows Grep:

Chris Roberts for GREP.DLL. The DLL provides the regular expression compiler and parser. Chris can be contacted at 70550,2601 on CompuServe or  22092 San Fernando Court, Cupertino, CA 95014, USA.

Trevor Prinn (tprinn@cix.compulink.co.uk) for the registration unit.

Enrico Lodolo (CIS:100275,1255) for the microscrolls unit.

The many beta testers on CompuServe and the CIX conferencing system who have helped to ensure this program is (hopefully) bug-free.


Command line examples

WGREP Win *.PAS

Search all Pascal source files in the current directory for the string "Win" using parameters set up last search.

WGREP /i Grep *.C

Search all C source files for the string "Grep", ignoring case.

WGREP /af /n- Hello *.DOC

Search for "Hello" in all document files; do not number lines and shown first match only.

WGREP /aa /v a *.TXT

Display all lines that do NOT contain the letter a in *.TXT files.

WGREP /dc:\msvc\work GetDC *.CPP

Search *.cpp files in c:\msvc\work for "GetDC"

Note that settings are preserved between executions. For example, once /n- has been specified in example 3, it will be remembered for example 4 and all subsequent searches, and would have to be cancelled by adding /n to one of their command lines.


So, whats new in this release?

Heres a brief summary of whats new. See What's new in version 1.5 for full details.

- 	Support for UNIX style text files

- 	Increased search speed

-	Better memory and resource usage

-	Regular expression enhancements including logical operators

-	Date and time filtering

-	Progress bar while searching

-	Support for the PFE editor

-	Floating toolbox

-	Separate screen and printer fonts

-	Windows For Workgroups File Manager toolbar support


Search Criteria Dialog Box

This dialog box is displayed when a search is initiated by selecting File|Search... from the menu or pressing the magnifying-glass button on the toolbar.

Click on the area of the dialog you want help on, or select a topic from the list:

String	Action
Filespec	Regular expression characters
Directory	Filter dialog


Drag-Drop/alternative search criteria dialog box
Search Criteria Dialog Box

This dialog box is displayed when a search is initiated by drag-drop, the File Manager extension, or when changing criteria once a file has been loaded into a view window.

Click on the area of the dialog you want help on, or select a topic from the list:

   String

   Action

   Regular expression characters


String
Search Criteria - String

Enter the string to locate in the top edit box. It can be up to 255 characters and may contain regular expression characters. The last 10 strings entered can be recalled by pressing the down arrow button on the right.

The level of regular expression parsing required can be set using the drop-down list below. Choosing No regular expressions will disable regular expression character parsing and all characters will be searched for literally. Selecting Standard regular expressions will enable parsing of the UNIX standard regular expression characters. Finally selecting Extended regular expressions will enable all UNIX standard regular expression characters and Windows Grep's extensions. For more information, see the topic on regular expressions.

Checking Ignore Case will result in string comparisons ignoring the case of the search string. To have Windows Grep ignore matches that form only part of a word and find complete words only, check Whole words only.

Pressing the Reg exp list >> button will expand the dialog box and provide a list of regular expression characters.

See also

   Regular Expressions

   Regular expression characters


Filespec
Search Criteria - Filespec

Enter the file(s) to search in this edit box. You can enter DOS wild cards (* and ?) to search multiple files, or specify several discreet filenames separated by semicolons. The last 10 file specs entered can be recalled by pressing the down arrow button on the right.

Examples:

*.PAS

Search all Pascal source files

*.C;*.H

Search all C source and header files

MEMO.TXT;TEST.TXT

Search memo.txt and test.txt

WGREP.DOC

Search the file wgrep.doc

If a filespec *.* is entered, the options Skip text files and Skip binary files become available and provide control over the type of file searched. This is useful if you wish, for example, to search all text files in a directory regardless of their extension. Setting both Skip text and Skip binary will result in no files being searched! For information on how Windows Grep differentiates between text and binary files see Notes on searching binary files.

The files searched can be further controlled by specifying date and size criteria. Clicking the Filters... button displays the filter dialog box for specifying these criteria.

Once filter conditions have been specified, the filters must be enabled using the Enable date filter and Enable size filter checkboxes. One, the other, or both can be enabled to provide fine control over the range of files searched.

See also

   Filter dialog


Directory
Search Criteria - Directory

Enter the directory to start the search in.  You can specify several directories by separating them with semicolons. The last 10 directories entered can be recalled by pressing the down arrow button on the right. All directories under the one entered can be searched by selecting the Recurse Sub directories option.

Examples:

C:\WINDOWS

Start the search in c:\windows

C:\WINDOWS;C:\ACCESS

Search c:\windows, then c:\access

To pick the start directory using a standard directory dialog, press the New... button. To append a new directory to the one already in the directory edit box, add a semicolon to the end of the existing entry in the edit box before pressing New....

Checking Count files first will allow Windows Grep to count the number of files that are to be searched before searching them. This information can then used to display progress during the search. If you are searching relatively few files (say less than 300) it is best to have this enabled, since the time taken to count the files before the search commences will be negligible.


Action
Search Criteria - Action

The choices in the combo-box provide options to control the format of the information displayed when searching. The choices provided are:

Display all matches

Display the names of files containing matches, all matches found and a count of matches.

Stop after first match

Display the names of files containing matches and the first match only.

Count matches

Display the names of files containing matches and a count of matches only.

Display names of files only

Display the names of files containing matches only.

Several other options control the appearance of output or Windows Grep behaviour during and after a search:

Checking Number Lines will cause all lines to be preceded with their line number (or file offset in the case of binary files) This option must be on for view window positioning to function.

Checking Invert Match will invert the search and show/count all lines that do NOT contain the search string. This option has no meaning when searching binary files.

Checking Close dialog will cause the search progress dialog box to be closed as soon as the search is complete. Normally, it remains open until you dismiss it by pressing OK.

Finally, Autoscroll provides the facility to have the result window automatically scroll as it fills, so the last match found can always be seen. THIS OPTION IS NOT RECOMMENDED if you expect to find a lot of matches. It slows the search down considerably.


Search Criteria - Regular Expression Characters

This list provides a handy reference to the myriad of regular expression characters supported by Windows Grep. The list is split in two: standard characters and extended characters. Double clicking on an entry in the list will append the character clicked-on to the end of the search string.

See also

   Regular Expressions


Shareware Registration Form
Registration Form

Print this form and send it with your remittance to:

Huw Millington

71 Woodbury Avenue

East Grinstead

W. Sussex

RH19 3NY

ENGLAND

Please give an e-Mail address if you have one so I can inform you of your registration code as soon as I receive your order, and give timely information on upgrades.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Windows Grep v1.5 Registration Form.

I wish to register ____ copies of Windows Grep.

I am registering from:

USA and enclose a check for $US______	($20 per copy)

UK and enclose a cheque/PO for £______	(£10 per copy)

Europe and enclose a Eurocheque for £______	(£10 per copy)

Another country and enclose a check drawn on a local bank for ______

(equivalent in value to $US 20 per copy)

Name(s)	_______________________________________________

(To appear in about box, continue on separate sheet if necessary)

Company	_______________________________________________

Address	_______________________________________________

_______________________________________________

_______________________________________________

Code	___________________

Country	___________________

E-Mail	___________________

I obtained Windows Grep from: _______________________________________

Tick here if you need a receipt: ____

Comments:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Thank you!


Configuration Dialog Box

Click on the area of the dialog you want help on, or select a topic from the list:

Internal options	Font
Text file double-click action	Binary file double-click action
Tools	Start-up options
Color


Internal options
Configuration - Internal Options

This panel provides control over the appearance and behaviour of result and view windows.

Re-use internal view windows controls the behaviour of view windows:

Un-checked: Every time a line in a file is double-clicked on in a result window the file is loaded into a new view window.

Checked: If the line double-clicked on comes from a file already loaded into a view window, the text in the existing window is repositioned at the new line.

Enter the number of spaces tabs are to be expanded to in the Tab Width edit box. A value of 1 will speed up searches slightly since tab expansion is then bypassed altogether.

The Binary Window edit box allows the number of characters either side of matches in binary files to be adjusted in the range 0-99


Text viewer options
Configuration - Text Viewer Options

The choice in this panel determines what action is taken when a line from a text file in a result window is double-clicked on.

Load file into viewer

Selecting this option causes the file containing the line double-clicked on to be loaded into a view window.

Launch associated application

Selecting this causes the application which originally created the file double-clicked on to be started up with the file loaded. Note that associations are set up by File Manager and stored in WIN.INI.

Execute command below

Selecting this causes the command in the edit box below to be executed when a line is double-clicked on.

Ask after double-click

When this is selected, a dialog box will be presented after double-clicking to allow one of the above three choices to be picked.

In the edit box, enter the command to be run when Execute command below is selected.

The format of the command is as follows:

program-name   parameters

The parameters take the form of tokens that are given values after double-clicking. The following are available:

$f	Name of the file containing the line double-clicked on

$l	Number of the line double-clicked on

$g	The Grep string used for the search

$$	a $

Examples:

notepad.exe $f	Run notepad passing the name of the file containing the line double-clicked on

c:\utils\myedit.exe $f $l	Run myedit.exe passing filename and line number

See also

   Using Windows Grep with SpexEdit

   Using Windows Grep with PFE


Tool positions
Configuration - Tools

This panel allows you to control the position and appearance of the toolbar. It is not normally displayed. To access it, press the More >> button. The choices are:

Main toolbar

Display all buttons on a toolbar under the menu bar.

Main and child toolbars

Display some buttons on a toolbar under the menu bar and others associated with child windows on a toolbar within each child window.

Toolbox

Display all buttons in a floating toolbox.

None

Don't display any toolbars or toolboxes.

If Main toolbar or Main and child toolbars is selected, their position can be changed to the Top of the window or down the Left hand side.


Configuration - Colors

The color of text output in the result and view windows can be altered. Five 'types' of text can be independently modified:

Normal text	All non-matching text

Headers	Filenames, line numbers of matching lines, offsets in binary view windows

Matches	Matches in result windows and text view windows

Highlight bar	Background color of the highlight bar in result windows

Highlight bar text	Color of non-matching text on the highlight bar

Select the text color attribute you want to change from the list, then press the Edit... button. The standard Windows color dialog box will be displayed to allow a new colour to be picked.


Configuration - Font

The font used in view and result windows can be changed to any non-proportional font, including TrueType, you have installed on your system. Press the Screen... button to display the standard Windows font selection dialog box and pick any font at any size you wish to use.

Similarly, The font used when printing can be changed by pressing the Printer... button. You can use any non-proportional font supported by your printer.

The support for different screen/printer fonts allows, for example, a highly readable screen font such as BorlandTE (supplied with Borland compliers) to be used on screen and a clear printer font such as Courier New to be used for printed output.


Binary viewer options
Configuration - Binary Viewer Options

The choice in this panel determines what action is taken when a line from a binary file in a result window is double-clicked on.

Load file into viewer

Selecting this option causes the file containing the line double-clicked on to be loaded into a view window.

Launch associated application

Selecting this causes the application which originally created the file double-clicked on to be started up with the file loaded. Note that associations are set up by File Manager and stored in WIN.INI.

Execute command below

Selecting this causes the command in the edit box below to be executed when a line is double-clicked on.

Ask after double-click

When this is selected, a dialog box will be presented after double-clicking to allow one of the above three choices to be picked.

In the edit box, enter the command to be run when Execute command below is selected.

The format of the command is as follows:

program-name   parameters

The parameters take the form of tokens that are given values after double-clicking. The following are available:

$f	Name of the file containing the line double-clicked on

$l	Offset of the match double-clicked on from beginning of file in decimal

$o	Offset of the match double-clicked on from beginning of file in hexadecimal

$m	The length of the match in decimal

$g	The Grep string used for the search

$$	a $

Examples:

write.exe $f	Run write passing the name of the file containing the line double-clicked on

windump.exe $f $l $m	Run windump.exe passing filename, offset in decimal and the length of the match


Startup options
Configuration - Start-up Options

The controls in this panel affect the behaviour of Windows Grep when it is started. It is not normally displayed. To access it, press the More >> button.

Display splash-screen

Checking this option will cause the splash-screen to be displayed before Windows Grep can be used. Note that only registered users can turn it off.

Change to saved directory

If this is checked, the directory control in the Search Criteria dialog box will display the directory the last search was started from. Otherwise, it will show the current directory, or any working directory set up for Windows Grep in the Program Manager.

Activate search dialog

Checking this causes the Search Criteria dialog box to be automatically displayed when Windows Grep is started.

Install File Manager extension

If this option is checked, an entry will be made in WINFILE.INI which will make the Windows Grep File Manager extension available the next time the File Manager is started.

See also

   Using the File Manager extension


Regular Expressions

Windows Grep supports a wide range of regular expression specifiers. In addition to the standard UNIX-defined characters, Windows Grep provides a number of others to further enhance their usefulness.

   Standard UNIX characters

   Extended characters


Standard Regular Expression Characters

The standard regular expression characters are: ^ $ ? : * + - [] \. In order to enable them to be interpreted as regular expression specifiers, the 'Grep level' should be set to Standard regular expressions or Extended regular expressions in the search criteria dialog box.

A number of characters are only useful when searching text files. When searching binary files, their interpretation will probably cause unexpected results. These are marked with a (*). For more information about searching binary files, see Notes on searching binary files

Note: Some of the examples below assume that the 'Grep level' is set to Standard regular expressions since they use brackets () and other characters that would be interpreted as regular expression characters if Extended regular expressions were selected.

^ 	Circumflex (*)	Constrain to start of line

A circumflex as the first character of the string constrains matches to start of lines.

Examples:

^Win	Match lines beginning with Win

^	Match every non-blank line

^Grep	Match lines beginning with Grep

$ 	Dollar (*)	Constrain to end of line

A dollar as the last character of the string constrains matches to end of lines.

Examples:

then$	Match lines ending with then

^end$	Match lines consisting of the single word end

? 	Question mark	Match any character

A question mark anywhere in the string matches any single character. Note that this is usually a . (period) in UNIX but has been changed for ease of use and consistency with DOS wild cards.

Examples:

H??p	Matches Help, Hoop, Harp etc.

H?w	Matches Huw, How, Haw etc.

^Win?ows	Matches lines beginning with Windows, Win ows etc.

: 	Colon	Match character class

A colon matches a class of characters described by the character following:

:a	matches any alphabetic, ignoring case

:d	matches digits

:n	matches alphanumerics, ignoring case

:	(: followed by a space) matches spaces, tabs and other control characters.

Examples:

(:d)	Matches (0), (9), etc. but not (A), (b), (_) etc.

:a)$	Matches lines ending in GetDC(HWnd), (Windows) etc. but not MessageBeep(0)

{:n: }	Matches {0 }, {A }, etc.

^: 	(colon followed by a space) Matches lines beginning with a tab or space etc.

* 	Asterisk	Match 0 or more

An expression followed by a asterisk matches zero or more occurrences of that expression.

Examples:

fo*	Matches f, fo, foo etc.

00*	matches 0, 00, 000, 0000 etc.

Notes:

A single chatacter followed by a * (such as 0*)  will cause an error.

+ 	Plus	Match 1 or more

An expression followed by a plus sign matches one or more occurrences of that expression.

Examples:

fo+	Matches fo, foo etc.

10+	Matches 10, 100, 1000, 10000 etc.

(:d+)	Matches (0), (12464), (12) etc.

- 	Minus	Optionally match

An expression followed by a minus sign optionally matches that expression.

Examples:

fo-	Matches f and  fo

10-	Matches 1 and 10

Notes:

A single chatacter followed by a - (such as 0-)  will cause an error.

[ ] 	Square brackets	Character group

A string enclosed in square brackets matches any character in that string, but no others. If the first character of the string is a circumflex the expression matches any character except the characters in the string. A range of characters may be specified by two characters separated by a -. These should be given in ASCII order (A-Z, a-z, 0-9 etc.)

Examples:

{[0-9]}	Matches {0}, {4}, {5} etc.

([0-9]+)	Matches (100), (342), (4), (23456) etc.

H[uo]w	Matches Huw and How

Gre[^py]	Matches Green, Great etc. but not Grep, Grey etc.

[z-a]	Matches nothing

^[A-Z]	Match lines beginning with an upper-case letter

\ 	Backslash	Quote next character

A backslash quotes any character. This allows a search for a character that is usually a regular expression specifier while parsing of standard or extended regular expression characters are enabled.

Examples:

\$	Matches a dollar sign $

\+	Matches a +

\:	Matches a colon :


Extended regular expression characters
Windows Grep Regular Expression Extension Characters

The extended regular expression characters are: ** | & # () <> {}. In order to enable them to be interpreted as regular expression specifiers, the 'Grep level' should be set to Extended regular expressions in the search criteria dialog box.

A number of characters are only useful when searching text files. When searching binary files, their interpretation will probably cause unexpected results. These are marked with a (*). For more information about searching binary files, see Notes on searching binary files

** 	Double asterisks	Match anything

Two asterisks together match any number of any character and is functionally equivalent to the DOS wild card (*)

Examples:

W**s	Matches Windows, Wands, Warriors, Was, Winds etc.

**.PAS	Matches GREP.PAS, GLOBAL.PAS etc.

Notes:

** on its own is illegal and will cause an error.

| 	Bar (*)	Logical OR

Matches lines containing one OR another expression, or both.

Examples:

Win|if	Match lines containing Win, if or both

Match:	if a=1 then GetDC(HWindow)

WindowHandle = 23;

If you look out the window you'll see the winner

If only I could think of some better examples...

Don't match:	Hunter? Never heard of it.

MessageBeep(0)

Grep|00*	Match lines containing Grep or 00, 000 etc.

Match:	Windows Grep is a great program!

GrepPosition = 100

Notes:

Normally, when searching for a single expression such as Win, all occurences of that expression in the line are shown. However when OR is used the search will stop after the first of each expression has been found. In the above example, to ensure all occurences of both Win and If, the logical group charaters ( and ) need to be used. See the section below for an example.

& 	Ampersand (*)	Logical AND

Match lines containing one AND another expression.

Examples:

Win&if	Match lines containing Win and if

Match:	If I open the Window

I wonder if Grep will run on Windows NT one day

Don't match:	Windows Grep is the best Windows search program

If a=b

Grep&H[uo]w	Match lines containing Grep and Huw, How etc.

Match:	Huw Millington wrote Windows Grep using BPO7

Don't match:	The author, Huw Millington

How can I improve the program?

# 	Hash (*)	Logical XOR (exclusive OR)

Match lines containing one OR another expression, but not both.

Examples:

DC#Window	Match lines containing DC or Window, but not both

Match:	GetDC(MyWnd)

Washington DC, the capital of the USA

Window cleaner

Don't Match	GetDC(HWindow)

\([0-9]\)#\[[0-9]\]	Match lines containing (0), (9) or  [0], [9] etc, but not both

Match:	Array[0] = 23;

MessageBeep(0)

There are five (5) windows open

Don't match:	Array[0] = MyFunc(2)

() 	Curved brackets	Logical group

The curved brackets allow grouping of normal expressions, standard Grep expressions and logical expressions.

Examples:

(Windows)(Grep)	Find all occurrences of both Windows and Grep. This usage is similar to OR, but shows all occurences and not just the first of each in the line.

Match:	Windows Grep is the premier search program for Windows

(One&Two)|Three	Match lines containing One and Two, or lines containing Three

Match:	One, Two buckle my shoe

Three blind mice

(1&2)|(3&4)	Match lines containg 1 and 2, or 3 and 4

(W**s)(begin&end)	Match lines containing Windows, Winds etc. or begin and end

Match:	if Windows = 3 then begin a = 3; b = 4 end;

Microsoft Windows

The beginning generally comes before the end

Don't match:	In the end I broke the window.

<> 	Triangular brackets	Case sensitivity control

Overrides Ignore case setting within the search string:

< turns case sensitivity off

> turns it on

Examples (assuming Ignore case is set before search):

Win>DOWS	Matches WinDOWS and WINDOWS but not Windows

>WINDOWS< Grep	Matches WINDOWS Grep and WINDOWS GREP but not Windows Grep

{} 	Curly brackets	Whole words control

Overrides Match Whole Words setting within the search string.

{ Turns match whole words on

} turns it off

Examples (assuming match whole words is not set before search):

Win|{Grep	Match lines containing Windows, Winds etc. or the whole word Grep

{Win&}if	Match lines containing the word Win and words containing if


Notes On Searching Binary Files

A text file is defined as any file that is organised into 'lines' that are terminated by CR/LF, and which does not contain 'strange' control characters (such as 0). Such files include MSDOS batch files, INI files and program source code files. All others, including executables, DLLs, word-processor documents, spreadsheets, databases etc. are thus classified as binary.

Binary files do however contain text, and it is this text within these files that Windows Grep searches. Typically it will be 'embedded' amongst executable code (in the case of EXEs and DLLs), control-codes (word processor files), binary representations of numbers (spreadsheets), field information/separators (databases) etc.

When Windows Grep searches binary files, it picks out the 'blocks' of text within the file, then performs the search over each block. Blocks are considered to be contiguous strings of printing-ASCII characters, with a non-printing character before and after it. For example:

.......Windows Grep...........Microsoft Windows.................

........Borland Pascal is the best Windows development system...

(where '.' represents a non-printing character)

Line 1 contains 2 blocks of text, line 2 contains 1.

The organisation of binary files and the way they are searched has some side-effects, outlined in the following paragraphs:

Regular expression limitations

^ (constrain to start of line) and $ (constrain to end of line) rely on the concept of lines to be meaningful. Their use with binary files will thus probably result in unexpected results, since they will effectively be 'constrain to start/end of block'.

The logical characters, | (or) & (and) and # (exclusive or), operate over blocks and not the entire file. So, Windows&GPF will not find all files that contain both words Windows and GPF, but will only find matches if both words occur within the same block of text.

Meaningless search options

The option Invert match is not meaningful when searching binary files, and will be ignored if set.

Viewing binary files using the built-in view window

When binary files are loaded into a view window, either by double-clicking on a match in a result window, or by loading it directly from disk, the text displayed in the window is searched as text on a line-by-line basis. This means that a search string containing logical operators (| & #) such as Windows&GPF may result in more or less matches being shown in the view window than in the result window. This would occur, for example, if a particular line contained both words, but they were separated by control-codes thus not being in the same contiguous block of text within the binary file.

Also, if matches occur over line boundaries in the view window, they will not be shown.


Toolbar
Toolbars

The toolbars allow quick mouse access to Windows Grep's main functions.

There are two types of toolbar. The main toolbar, which is displayed in the main window, and child toolbars, which are displayed in each child window. Using the configuration dialog, it is possible to turn them on and off, and specify where they should be displayed: along the top of the windows or down the left hand side.  The location of the toolbars will determine which buttons appear on which toolbar. If you have the main toolbar only, all buttons will be in it. If you have main and child toolbars, some buttons will appear on the main toolbar and others on the child toolbars.

Instead of toolbars, you can elect to have a toolbox, in which case all buttons will be available in a floating toolbox. See the section on configuration for more information on changing the location and style of the toolbars.

Click on the button you want help on:


Search

Pressing this button initiates a search. It will be greyed out if a search is already in progress.

Equivalent menu command: File|Search...

See also

   Searching

   Search criteria dialog box


Configure

This button brings up the program configuration dialog. It will be greyed out if a search is in progress.

Equivalent menu command: File|Configure...

See also

   Configuration

   Configuration dialog box


Save As

Pressing this button allows the text in the active window to be saved to disk. It will be greyed out if no windows are open or a search is in progress.

Equivalent menu command: File|Save As...


Print

Press this button to print the text in the active window to the default printer. It will be greyed out if no windows are open or a search is in progress.

Equivalent menu command: File|Print


Tile

This button will arrange all open windows so they do not overlap. It will be greyed out if no windows are open or a search is in progress.

Equivalent menu command: Window|Tile


Stack

This button will stack all open windows vertically. It will be greyed out if no windows are open or a search is in progress.

Equivalent menu command: Window|Stack


Cascade

This button will arrange all open windows so their title bars are visible. It will be greyed out if no windows are open or a search is in progress.

Equivalent menu command: Window|Cascade


Help

This button activates the help system, although you have probably found that out for yourself by now!

Equivalent menu command: Help|Contents


Open

Pressing this button allows a file to be loaded into a view window, showing all occurrences of the current search string. It will be greyed out if a search is in progress.

Equivalent menu command: File|Open...


Change search criteria

This button, available in view windows or when a view window is active, allows the search criteria to be changed so that the file currently loaded can be searched for a different search string.

Equivalent menu command: File|Criteria...


View

This button, available in result windows or when a result window is active, will load the file which contains the highlighted line onto a view window. It will be greyed out on the main toolbar if a search is in progress, or if a result window is not active.

Equivalent menu command: Action|View


Launch

This button, available in result windows or when a result window is active, will launch the application associated with the file which contains the highlighted line to executed. It will be greyed out on the main toolbar if a search is in progress, or if a result window is not active.

Equivalent menu command: Action|Launch


Execute command

This button, available in result windows or when a result window is active, will execute the text or binary command, as appropriate, specified in the configuration dialog.

Equivalent menu command: Action|Execute Command

See also

   Configuration

   Configuration dialog box


Previous file/match

This button has two actions:

When a view window is active, the previous match in the file will be jumped to.

When a result window is active, the previous file in the window will be jumped to.

It will be greyed out on the main toolbar if a search is in progress.

Equivalent menu command: Action|Previous Match


Next file/match

This button has two actions:

When a view window is active, the next match in the file will be jumped to.

When a result window is active, the next file in the window will be jumped to.

It will be greyed out on the main toolbar if a search is in progress.

Equivalent menu command: Action|Next Match


Menus
Menu

Select the menu item you want help on:

File	Action	Window	Help
Search...	View	Tile	Contents
Configure...	Launch	Cascade	About
Criteria...	Execute	Stack
Open...	Previous	Arrange Icons
Save As...	Next	Close All
Print...
Print Setup...
Register...
Exit


File|Search...

This option displays the search criteria dialog box which is used to start a search.

Equivalent toolbar button:

See also

   Searching

   Search criteria dialog box


File|Configure...

This option gives access to the configuration dialog, where many aspects of Windows Grep can be changed.

Equivalent toolbar button:

See also

   Configuration

   Configuration dialog box


File|Criteria...

This option is available only when a view window is active. It presents a dialog which allows the search criteria for the active view window to be altered.

Equivalent toolbar button:

See also

   Change criteria dialog box


File|Open...

Use this option to open a file and load it into a view window. If a view window is active, the file will be loaded into it. If not, a new view window will be opened. All matches found will be shown as the file is loaded.

Equivalent toolbar button:


File|Save As...

This option saves the text in the current window to disk.

Equivalent toolbar button:


File|Print...

This option will print the text in the active window, in the same font and format as used in the window. Matches will be shown underlined on the printout.

Equivalent toolbar button:


File|Print Setup...

This gives access to the Windows printer setup dialog to allow the print destination to be selected before printing.

Equivalent toolbar button: None


File|Register...

Use this option to access the registration dialog once you have received your registration details.

Equivalent toolbar button: None

See also

   Shareware information

   Shareware registration form

   Entering your registration information


File|Exit

This option exits Windows Grep, and is equivalent to the Close option on the system menu.

Equivalent toolbar button: None


Action|View

Available only when a result window is active, this option will load the file which contains the currently highlighted line into a view window.

Equivalent toolbar button:


Action|Launch

Available only when a result window is active, this option will launch the application associated with the file which contains the currently highlighted line. Associations are stored in WIN.INI and are set up using File Manager. See your Windows manual for more information.

Equivalent toolbar button:


Action|Execute Command

Available only when a result window is active, this option will execute one of the commands set up in the configuration dialog. The command executed will depend on whether the currently highlighted line comes from a text or binary file.

Equivalent toolbar button:


Action|Previous

If a view window is active, it jumps to the previous match in the file. If a result window is active, it jumps to the previous file.

Equivalent toolbar button:


Action|Next

If a view window is active, it jumps to the next match in the file. If a result window is active, it jumps to the next file.

Equivalent toolbar button:


Window|Tile

This option tiles the open windows, usually arranging them vertically.

Equivalent toolbar button:


Window|Cascade

This option cascades open windows, so that all title bars can be seen.

Equivalent toolbar button:


Window|Stack

This option stacks the open windows horizontally.

Equivalent toolbar button:


Window|Arrange Icons

This option arranges the iconic windows at the bottom of the MDI window.

Equivalent toolbar button: None


Window|Close All

This option closes all open windows.

Equivalent toolbar button: None


Help|Contents

This option gives access to the Windows Grep help system.

Equivalent toolbar button:


Help|About...

This option displays a dialog giving details of program and DLL versions, and copyright information.

Equivalent toolbar button: None


Filter Dialog Box

This dialog provides options for limiting the files that are searched by specifying file date and size criteria.

Click on the area of the dialog you want help on, or select a topic from the list:

   Date filters

   Size filters


Date Filters

In this panel, you can choose between searching files that are less than n days old, greater than n days old, or have a date stamp between two specified dates.

To activate date filtering, check the Enable date filter option on the main search criteria dialog box.


Size filters

In this panel, you can choose between searching files that are less than n bytes, greater than n bytes long, or have a file size between two specified file sizes.

To activate size filtering, check the Enable size filter option on the main search criteria dialog box.


Search Progress Dialog Box

The search progress dialog box is displayed during and after a search and shows information about the search as it progresses, or total statistics after it has finished.

Click on the area of the dialog you want help on, or select a topic from the list:

   Status

   Progress

   Statistics

   Exclusive


Search Status

This section shows what is being searched for and other information about the progress of the search such as "counting files", "stopped by user" etc.


Search Progress

The middle panel of the dialog displays the directory and file currently being searched and the number of files searched so far. If you elected to Count Files First on the search criteria dialog box, the total number of files to be searched will be shown and the progress bar will display the percentage of the search completed. If the files were not counted, this information will not be known and the progress bar will not work.

The two buttons on the right allow either the current directory or file to be skipped. These are useful if Windows Grep starts to search a large directory or file that you are not interested in.


Search Statistics

The statistics panel shows, from left to right: the number of matches found in the current file, the number found in all files searched and the number of files searched that contain matches.


Exclusive

Windows Grep is an excellent multi-tasker. It will search quietly in the background while you get on with something else. This has one side effect: It slows the search down. If you want Windows Grep to work exclusively in the foreground, thus speeding up the search, check this box. You will find that the Skip File button is disabled (because Windows Grep will no longer yield control while searching a file) and the response to pressing the Skip Dir and Cancel buttons sluggish as they will only be acted on after the file currently being searched has been finished.